package com.lzl.soaware.db.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;

import javax.sql.DataSource;

@Component
public class DataSourceConfig {

    @Autowired
    DataSource dataSource;

    @Bean(name = "soawareJdbcTemplate")
    public JdbcTemplate soawareJdbcTemplate() {
        return new JdbcTemplate(dataSource);
    }


}
